package org.jeecg.modules.procurement.service.impl;

import org.jeecg.modules.procurement.entity.BussMaterialProcurementPlanDetail;
import org.jeecg.modules.procurement.mapper.BussMaterialProcurementPlanDetailMapper;
import org.jeecg.modules.procurement.service.IBussMaterialProcurementPlanDetailService;
import org.jeecg.modules.procurement.vo.BussMaterialProcurementPlanDetailPage;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 原料采购计划单明细
 * @Author: jeecg-boot
 * @Date:   2024-06-06
 * @Version: V1.0
 */
@Service
public class BussMaterialProcurementPlanDetailServiceImpl extends ServiceImpl<BussMaterialProcurementPlanDetailMapper, BussMaterialProcurementPlanDetail> implements IBussMaterialProcurementPlanDetailService {
	
	@Autowired
	private BussMaterialProcurementPlanDetailMapper bussMaterialProcurementPlanDetailMapper;
	
	@Override
	public List<BussMaterialProcurementPlanDetailPage> selectByMainId(String mainId) {
		return bussMaterialProcurementPlanDetailMapper.selectByMainId(mainId);
	}

	@Override
	public List<BussMaterialProcurementPlanDetailPage> selectByApplicationId(String id) {
		return bussMaterialProcurementPlanDetailMapper.selectByApplicationId(id);
	}

	@Override
	public List<BussMaterialProcurementPlanDetailPage> selectByApplicationDetailId(List<String> ids) {
		String[] idArray = ids.stream().toArray(String[]::new);
		return bussMaterialProcurementPlanDetailMapper.selectByApplicationDetailId(idArray);
	}
}
